<template>
    <has-left-nav-layout>
        <template v-slot:leftNav>
            <left-menu :lists="menus"/>
        </template>
        <router-view></router-view>
    </has-left-nav-layout>
</template>

<script>
import { reactive,toRefs,getCurrentInstance,onMounted } from 'vue'
import {useRoute,useRouter} from 'vue-router'
import { useStore } from 'vuex'
import hasLeftNavLayout from '@/components/hasLeftNavLayout.vue'
import leftMenu from '@/components/leftMenu.vue'
import { useI18n } from 'vue-i18n'
export default {
    components:{
       hasLeftNavLayout,
       leftMenu
    },
    props:{

    },
    setup(props,context){
        const router = useRouter()
        const route = useRoute()
        const store = useStore()
        const {proxy} = getCurrentInstance()
        const {t} = useI18n()

        const state = reactive({
            menus:[
                
            ]
        })

        onMounted(()=>{
            state.menus = [
                {name:t('income.title1'),path:'/capital/income',title:'收入'},
                {name:t('income.title2'),path:'/capital/expend',title:'支出'},
                {name:t('income.title3'),path:'/capital/ranking',title:'全网排名'},
                {name:t('income.title4'),path:'/capital/assets',title:'我的资产'}
            ]
        })


        return{
            ...toRefs(state)
        }
    }
}
</script>

<style lang="scss" scoped>
    
</style>